﻿using System;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using System.Windows.Forms;
using Npgsql;
using System.Data;
using System.Configuration;

namespace Tudo.GUI
{
    static class Program
    {
        /// <summary>
        /// Point d'entrée principal de l'application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            // Getting the connection strings from the config file
            Hashtable config = (Hashtable)ConfigurationManager.GetSection("db_config/db_connexion");
            string connString = String.Format(
                                                "Server={0};Port={1};User={2};Password={3};Database={4}",
                                                config["db_host"],
                                                config["db_port"],
                                                config["db_user"],
                                                config["db_passwd"],
                                                config["db_name"]
                                              );
            // Setting the Database connection string
            Tuto.BLL.BLLObject.connectionString = connString;

            // The test of the installed, activated and disactivated modules here
            // ...

            // The construction of the menu bar automatically here 
            // ...
        }
    }
}
